package com.sky.config;

import com.sky.properties.AliOssProperties;
import com.sky.utils.AliOssUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.PropertiesUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@Slf4j
public class AliOssConfig {
    @Bean
    public AliOssUtil aliOssUtil(AliOssProperties AliOssProperties) {
        log.info("aliOssUtil初始化成功");
       return new AliOssUtil(AliOssProperties.getEndpoint(), AliOssProperties.getAccessKeyId(), AliOssProperties.getAccessKeySecret(), AliOssProperties.getBucketName());

    }
}
